package com.gitee.cui.springcloud.service;

import org.springframework.stereotype.Component;

/**
 * 通过对服务端调用接口（feign客户端接口）进行实现，对其中的每个方法做降级逻辑处理
 * 可以比较集中处理而且不会出现代码膨胀和代码耦合的问题
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022-03-07 15:53
 **/
@Component
public class PaymentFallbackService implements PaymentHystrixService{
	@Override
	public String paymentInfoOk(Long id) {
		return "PaymentFallbackService -> paymentInfoOk, id: " + id;
	}

	@Override
	public String paymentInfoTimeout(Long id) {
		return "PaymentFallbackService -> paymentInfoTimeout, id: " + id;
	}
}
